class TournamentSelector
	attr_accessor :size

	def initialize(size)
		@size = size
	end
#copia las referencias 
#voy a tener pop[c1,c2,c3] si gana c1 => new_poop[c1] son el mismo objeto c1 en sendas colecciones
	def select(population)
	new_pool = []
		(population.size/@size).times{
			miniTournament=[]
			@size.times{
				miniTournament << population.sample
				population -= miniTournament
			}
			new_pool << miniTournament.sort{|a,b|a.fitness_value <=> b.fitness_value}.last
		}
	return new_pool
	end
end
